<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增用户')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-user-add">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">用户名称 ：</label>
            <div class="col-sm-8">
                <input name="username" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">用户密码 ：</label>
            <div class="col-sm-8">
                <input name="password" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">性别：</label>
            <div class="col-sm-8">
                <input name="gender" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">生日 ：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <input name="birthday" class="form-control" placeholder="yyyy-MM-dd"
                           type="text">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">最近一次登录时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <input name="lastLoginTime" class="form-control" placeholder="yyyy-MM-dd"
                           type="text">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">最近一次登录IP地址：</label>
            <div class="col-sm-8">
                <input name="lastLoginIp" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">用户层级：</label>
            <div class="col-sm-8">
                <input name="userLevel" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">用户昵称：</label>
            <div class="col-sm-8">
                <input name="nickname" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">手机号码：</label>
            <div class="col-sm-8">
                <input name="mobile" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">用户头像：</label>
            <div class="col-sm-8">
                <input name="avatar" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">微信登录openid
                ：</label>
            <div class="col-sm-8">
                <input name="weixinOpenid" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">状态
                ：</label>
            <div class="col-sm-8">
                <input name="deleted" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">分享用户id
                ：</label>
            <div class="col-sm-8">
                <input name="shareUserId" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
        var prefix = ctx + "mini/user"
        $("#form-user-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-user-add').serialize());
            }
        }

        $("input[name='birthday']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='lastLoginTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });


</script>
</body>
</html>